<div class="modal fade" id="add">
    <div class="modal-dialog modal-lg modal-dialog-centered">
        <div class="modal-content">
            <form #addForm="ngForm" (ngSubmit)="add(addForm.value)">
            <!-- 模态框头部 -->
            <div class="modal-header">
                <h4 class="modal-title">产品类别 — 新增</h4>
                <button type="button" class="close" data-dismiss="modal">&times;</button>
            </div>
            <!-- 模态框主体 -->
            <div class="modal-body">
                <div class="container">
                    <div class="input_div">
                        <label class="input_title">上层产品类别：</label>
                        <select class="input_inputStyle" name="parentId">
                            <option selected value="{{ this.productTypeCurrentId.themeWordsId }}" *ngIf="this.productTypeCurrentId">{{ this.productTypeCurrentId.name }}</option>
                            <option value=""></option>
                        </select>
                        (为空则为一级层级)
                    </div>
                    <div class="input_div">
                        <label class="input_title">产品类别名称：</label>
                        <input type="text" name="name" class="input_inputStyle" [(ngModel)]="productTypeAddType.name" placeholder="输入产品类别名称" forbiddenName="bob"
                               minlength="1" maxlength="20" #name="ngModel" required />
                    </div>
                    <div class="input_div">
                        <label class="input_title">是否启用：</label>
                        <select class="input_inputStyle" name="status" #status="ngModel" ngModel="-1">
                            <option value="0">启用</option>
                            <option value="-1">禁用</option>
                        </select>
                    </div>

                    <div class="input_div">
                        <div class="textarea_title">描述：</div>
                        <textarea rows="5" type="text" placeholder="描述" name="description" #description=ngModel class="textarea_textareaStyle" placeholder="描述长度在0-50个汉字之间"
                                  minlength="0" maxlength="50" [(ngModel)]="productTypeAddType.description"></textarea>
                        <div *ngIf="description.invalid" class="error-alert text-left">
                            <div *ngIf="description.errors.minlength || description.errors.maxlength">
                                <small class="error "> 描述长度在0-50之间</small>
                            </div>
                        </div>
                    </div>

                </div>
            </div>
            <!-- 模态框底部 -->
            <div class="modal-footer" style="width: 100%;">
                <button type="submit" class="btn btn-primary" [disabled]="addForm.invalid">确定</button>
                <button type="button" class="btn btn-default" data-dismiss="modal" (click)="initService._init()">取消</button>
            </div>
            </form>
        </div>
    </div>
</div>